﻿namespace _1.Code_First_Database_Creation
{

	using System;
	using System.Collections.Generic;

	public class Course
	{
		private string? description;

		private ICollection<Student> students;

		public Course()
		{
			this.students = new HashSet<Student>();
		}

		public int Id { get; set; }
			
		public string Name { get; set; }

		public string Description
		{
			get
			{
				return this.description;
			}

			set
			{
				this.description = value;
			}
		}

		public DateTime StartDate { get; set; }

		public DateTime EndDate { get; set; }

		public decimal Price { get; set; }

		public virtual ICollection<Student> Students
		{
			get
			{
				return new HashSet<Student>(this.students);
			}

			set
			{
				this.students = value;
			}
		}

		public virtual ICollection<Resource> Resources { get; set; }

		public virtual ICollection<Homework> HomeworkSubmissions { get; set; }
	}
}
